package com.lagou.edu.utils;

import org.I0Itec.zkclient.ZkClient;


public class ZookeeperUtil {

    /**
     * zookeeper地址
     */
    private static String ZK_HOST = "192.168.0.105";

    /**
     * 服务端信息根节点
     */
    public static final String ROOT_PATH = "/datasourceConfig";

    private static ZkClient zkClient;

    private ZookeeperUtil() {

    }

    public static ZkClient getZkClient() {
        if(zkClient == null) {
            zkClient = new ZkClient(ZK_HOST, 10000);
        }
        return zkClient;
    }

}
